We currently display the percentage as "100%" if the battery state is
"fully charged", but the actual capacity may be lower than that.
Just show the real percentage, which is consistent with Settings.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3393
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1787>
this._item.icon.fallback_icon_name = fallbackIcon;
// The icon label
- let label;
- if (this._proxy.State == UPower.DeviceState.FULLY_CHARGED)
- label = _("%d\u2009%%").format(100);
- else
- label = _("%d\u2009%%").format(this._proxy.Percentage);
+ const label = _('%d\u2009%%').format(this._proxy.Percentage);
this._percentageLabel.text = label;
// The status label